package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusMechanicalStaItem;
import com.punai.customer.domain.vo.CusLinkStaVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 机械费用项Mapper接口
 *
 * @author zxw_
 * @date 2023-02-02
 */
public interface CusMechanicalStaItemMapper extends CommonMapper<CusMechanicalStaItem>
{
    /**
     * 查询机械费用项
     *
     * @param id 机械费用项主键
     * @return 机械费用项
     */
    public CusMechanicalStaItem selectCusMechanicalStaItemById(String id);

    /**
     * 查询机械费用项列表
     *
     * @param cusMechanicalStaItem 机械费用项
     * @return 机械费用项集合
     */
    public List<CusMechanicalStaItem> selectCusMechanicalStaItemList(CusMechanicalStaItem cusMechanicalStaItem);

    public List<CusMechanicalStaItem> selectSimplifyList(@Param("companyId")Long companyId);


    /**
     * 删除机械费用项
     *
     * @param id 机械费用项主键
     * @return 结果
     */
    public int deleteCusMechanicalStaItemById(String id);

    /**
     * 批量删除机械费用项
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCusMechanicalStaItemByIds(String[] ids);

    List<CusMechanicalStaItem> selectLinkDataList(@Param("linkFlag") String linkFlag, @Param("chapterId") String chapterId,
                                                  @Param("companyId") Long companyId, @Param("itemName") String itemName);

    List<CusLinkStaVo> selectByCusId(@Param("cusId")String cusId, @Param("companyId")Long companyId);

    String ifExistFee(@Param("companyId")Long companyId);

    Integer selectLinkDataListCount(@Param("linkFlag") String linkFlag, @Param("chapterIds")List<String> chapterIds,
                                                                                             @Param("companyId")Long companyId);

}
